package edu.ztr.mapper;

import edu.ztr.pojo.Key;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface LoginMapper {
    // 登录
    @Select("select * from user1 where name = #{name} and  keyword = #{keyword}")
    Key login(Key key);
    // 注册用
    @Insert("INSERT into user1 values (#{name},#{keyword})")
    void register(Key key);
    // 注册用
    @Select("select * from user1 where name = #{name} ")
    Key search(Key key);
}
